package main

import (
	"context"
	"dubbo-go-app/api"
	"dubbo.apache.org/dubbo-go/v3/config"
	_ "dubbo.apache.org/dubbo-go/v3/imports"
	"fmt"
)

var grpcGreeterImpl = &api.GreeterClientImpl{}

func main() {
	config.SetConsumerService(grpcGreeterImpl)
	if err := config.Load(); err != nil {
		panic(err)
	}

	req := &api.SqlRequest{
		Id: 123,
	}
	reply, err := grpcGreeterImpl.SqlRemove(context.Background(), req)
	if err != nil {
		panic(err)
	}
	fmt.Println(reply)
}
